using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._FeatureBinning
{
    /// <summary>
    /// <para>Enable Feature Binning</para>
    /// <para>Enables feature binning on a feature class.</para>
    /// <para>在要素类上启用要素分箱。</para>
    /// </summary>    
    [DisplayName("Enable Feature Binning")]
    public class EnableFeatureBinning : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public EnableFeatureBinning()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The feature class for which feature binning will be enabled. Only point and multipoint feature classes stored in an enterprise geodatabase or database are supported. The data cannot be versioned or archive enabled.</para>
        /// <para>将为其启用要素装箱的要素类。仅支持存储在企业级地理数据库或数据库中的点要素类和多点要素类。无法对数据进行版本控制或存档。</para>
        /// </param>
        public EnableFeatureBinning(object _in_features)
        {
            this._in_features = _in_features;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Enable Feature Binning";

        public override string CallName => "management.EnableFeatureBinning";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_features, _bin_type.GetGPValue(), _bin_coord_sys, _summary_stats, _generate_static_cache.GetGPValue(), _out_features];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The feature class for which feature binning will be enabled. Only point and multipoint feature classes stored in an enterprise geodatabase or database are supported. The data cannot be versioned or archive enabled.</para>
        /// <para>将为其启用要素装箱的要素类。仅支持存储在企业级地理数据库或数据库中的点要素类和多点要素类。无法对数据进行版本控制或存档。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Bin Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of binning that will be enabled. If you are using SAP HANA data, only square bins are supported.</para>
        ///   <bulletList>
        ///     <bullet_item>Flat hexagon—This binning scheme is also known as flat geohex or flat hexbinning. The tiles are a tessellation of hexagons in which the orientation of the hexagons has a flat edge of the hexagon on top. This is the default for Microsoft SQL Server, Oracle, and PostgreSQL data.</bullet_item><para/>
        ///     <bullet_item>Pointy hexagon—This binning scheme is also known as pointy geohex or pointy hexbinning. The tiles are a tessellation of hexagons in which the orientation of the hexagons has a point of the hexagon on top.</bullet_item><para/>
        ///     <bullet_item>Square—This binning scheme is also known as geosquare or squarebinning. The tiles are a tessellation of squares This is the default for Db2 and SAP HANA data. This is the only available bin type for SAP HANA data.</bullet_item><para/>
        ///     <bullet_item>Geohash—In this binning scheme, the tiles are a tessellation of rectangles. Because geohash bins always use the WGS 1984 geographic coordinate system (GCS WGS 1984, EPSG WKID 4326), you cannot specify a bin coordinate system for geohash bins.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将启用的装箱类型。如果使用的是 SAP HANA 数据，则仅支持方形条柱。</para>
        ///   <bulletList>
        ///     <bullet_item>扁平六边形 - 此分箱方案也称为扁平地理六边形或扁平六边形。瓷砖是六边形的镶嵌，其中六边形的方向在顶部具有六边形的平坦边缘。这是 Microsoft SQL Server、Oracle 和 PostgreSQL 数据的默认值。</bullet_item><para/>
        ///     <bullet_item>尖头六边形 - 此图格方案也称为尖头地六边形或尖头六边形。瓷砖是六边形的镶嵌，其中六边形的方向在顶部有一个六边形的点。</bullet_item><para/>
        ///     <bullet_item>正方形 - 此分箱方案也称为地理平方或平方分箱。切片是正方形的镶嵌 这是 Db2 和 SAP HANA 数据的缺省设置。这是 SAP HANA 数据唯一可用的 bin 类型。</bullet_item><para/>
        ///     <bullet_item>Geohash - 在此分箱方案中，切片是矩形的镶嵌。由于 geohash 条柱始终使用 WGS 1984 地理坐标系 （GCS WGS 1984， EPSG WKID 4326），因此无法为 geohash 条柱指定条柱坐标系。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Bin Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _bin_type_value? _bin_type { get; set; } = null;

        public enum _bin_type_value
        {
            /// <summary>
            /// <para>Flat hexagon</para>
            /// <para>Flat hexagon—This binning scheme is also known as flat geohex or flat hexbinning. The tiles are a tessellation of hexagons in which the orientation of the hexagons has a flat edge of the hexagon on top. This is the default for Microsoft SQL Server, Oracle, and PostgreSQL data.</para>
            /// <para>扁平六边形 - 此分箱方案也称为扁平地理六边形或扁平六边形。瓷砖是六边形的镶嵌，其中六边形的方向在顶部具有六边形的平坦边缘。这是 Microsoft SQL Server、Oracle 和 PostgreSQL 数据的默认值。</para>
            /// </summary>
            [Description("Flat hexagon")]
            [GPEnumValue("FLAT_HEXAGON")]
            _FLAT_HEXAGON,

            /// <summary>
            /// <para>Pointy hexagon</para>
            /// <para>Pointy hexagon—This binning scheme is also known as pointy geohex or pointy hexbinning. The tiles are a tessellation of hexagons in which the orientation of the hexagons has a point of the hexagon on top.</para>
            /// <para>尖头六边形 - 此图格方案也称为尖头地六边形或尖头六边形。瓷砖是六边形的镶嵌，其中六边形的方向在顶部有一个六边形的点。</para>
            /// </summary>
            [Description("Pointy hexagon")]
            [GPEnumValue("POINTY_HEXAGON")]
            _POINTY_HEXAGON,

            /// <summary>
            /// <para>Square</para>
            /// <para>Square—This binning scheme is also known as geosquare or squarebinning. The tiles are a tessellation of squares This is the default for Db2 and SAP HANA data. This is the only available bin type for SAP HANA data.</para>
            /// <para>正方形 - 此分箱方案也称为地理平方或平方分箱。切片是正方形的镶嵌 这是 Db2 和 SAP HANA 数据的缺省设置。这是 SAP HANA 数据唯一可用的 bin 类型。</para>
            /// </summary>
            [Description("Square")]
            [GPEnumValue("SQUARE")]
            _SQUARE,

            /// <summary>
            /// <para>Geohash</para>
            /// <para>Geohash—In this binning scheme, the tiles are a tessellation of rectangles. Because geohash bins always use the WGS 1984 geographic coordinate system (GCS WGS 1984, EPSG WKID 4326), you cannot specify a bin coordinate system for geohash bins.</para>
            /// <para>Geohash - 在此分箱方案中，切片是矩形的镶嵌。由于 geohash 条柱始终使用 WGS 1984 地理坐标系 （GCS WGS 1984， EPSG WKID 4326），因此无法为 geohash 条柱指定条柱坐标系。</para>
            /// </summary>
            [Description("Geohash")]
            [GPEnumValue("GEOHASH")]
            _GEOHASH,

        }

        /// <summary>
        /// <para>Bin Coordinate Systems</para>
        /// <para>The coordinate systems that will be used to visualize the aggregated output feature layer. You can choose up to two coordinate systems to visualize the output layer. By default, the coordinate system of the input feature class is used. Custom coordinate systems are not supported.</para>
        /// <para>将用于可视化聚合输出要素图层的坐标系。您最多可以选择两个坐标系来可视化输出图层。默认情况下，将使用输入要素类的坐标系。不支持自定义坐标系。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Bin Coordinate Systems")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _bin_coord_sys { get; set; } = null;


        /// <summary>
        /// <para>Summary Statistics</para>
        /// <para><xdoc>
        ///   <para>Specifies the statistics that will be summarized and stored in the bin cache. Statistics are used to symbolize bins and provide aggregate information for all the points in a bin. One summary statistic, the total feature count (shape_count), is always available. You can define up to five additional summary statistics.
        ///   <bulletList>
        ///     <bullet_item>Field—The field on which to calculate the summary statistics. Supported field types are short integer, long integer, float, and double.  </bullet_item><para/>
        ///     <bullet_item>Statistic Type—The type of statistic to calculate for the specified field. Statistics are calculated for all features in the bin. Available statistics types are as follows:
        ///       <bulletList>
        ///         <bullet_item>Mean (AVG)—Calculates the average for the specified field      </bullet_item><para/>
        ///         <bullet_item>Minimum (MIN)—Finds the smallest value for all records of the specified field      </bullet_item><para/>
        ///         <bullet_item>Maximum (MAX)—Finds the largest value for all records of the specified field      </bullet_item><para/>
        ///         <bullet_item>Standard deviation (STDDEV)—Calculates the standard deviation value for the field      </bullet_item><para/>
        ///         <bullet_item>Sum (SUM)—Adds the total value for the specified field      </bullet_item><para/>
        ///       </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定将汇总并存储在 bin 缓存中的统计信息。统计数据用于对图格进行符号化，并提供图格中所有点的聚合信息。一个汇总统计数据，即要素总数 （shape_count），始终可用。您最多可以定义五个附加汇总统计数据。
        ///   <bulletList>
        ///     <bullet_item>字段 - 用于计算汇总统计数据的字段。支持的字段类型包括短整数、长整数、浮点数和双精度。 </bullet_item><para/>
        /// <bullet_item>统计类型 - 要为指定字段计算的统计数据类型。将计算图格中所有要素的统计数据。可用的统计信息类型如下：
        ///       <bulletList>
        ///         <bullet_item>平均值 （AVG） - 计算指定字段的平均值</bullet_item><para/>
        ///         <bullet_item>最小值 （MIN） - 查找指定字段的所有记录的最小值</bullet_item><para/>
        ///         <bullet_item>最大值 （MAX） - 查找指定字段的所有记录的最大值</bullet_item><para/>
        ///         <bullet_item>标准差 （STDDEV） - 计算字段的标准差值</bullet_item><para/>
        ///         <bullet_item>Sum （SUM） - 将指定字段的总值相加</bullet_item><para/>
        ///       </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Summary Statistics")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _summary_stats { get; set; } = null;


        /// <summary>
        /// <para>Generate Binning Cache</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a static cache of the aggregated results will be generated or visualizations will be aggregated on the fly. The cache is not necessarily created for all levels of detail.
        ///   <bulletList>
        ///     <bullet_item>Checked—A static cache of the aggregated results will be generated. It is recommended that you use this option for better performance. However, changes to the underlying data will not be updated in the cache unless the Manage Feature Bin Cache tool is run. This is the default for IBM Db2, Microsoft SQL Server, Oracle, and PostgreSQL data. You cannot generate a static cache for SAP HANA data. To generate a static cache for feature classes in PostgreSQL that use PostGIS spatial types, GDAL libraries must be installed in the database.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—A static cache of the aggregated results will not be generated, and visualizations will be aggregated on the fly. This is the only option for SAP HANA data.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是生成聚合结果的静态缓存，还是动态聚合可视化效果。不一定为所有细节级别创建缓存。
        ///   <bulletList>
        ///     <bullet_item>选中—将生成聚合结果的静态缓存。建议您使用此选项以获得更好的性能。但是，除非运行管理要素图格缓存工具，否则不会在缓存中更新对基础数据的更改。这是 IBM Db2、Microsoft SQL Server、Oracle 和 PostgreSQL 数据的缺省值。无法为 SAP HANA 数据生成静态缓存。要为 PostgreSQL 中使用 PostGIS 空间类型的要素类生成静态缓存，必须在数据库中安装 GDAL 库。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 不会生成聚合结果的静态缓存，并且将动态聚合可视化。这是 SAP HANA 数据的唯一选项。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Generate Binning Cache")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _generate_static_cache_value _generate_static_cache { get; set; } = _generate_static_cache_value._true;

        public enum _generate_static_cache_value
        {
            /// <summary>
            /// <para>STATIC_CACHE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("STATIC_CACHE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DYNAMIC</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DYNAMIC")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_features { get; set; }


        public EnableFeatureBinning SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}